package com.lambda.optional;

import java.util.Optional;

/**
 * @author bin
 * @date 2025 - 04 -07
 **/
public class main2 {
    public static void main(String[] args) {
        Optional<String> optional = Optional.of("hello");
        boolean present = optional.isPresent();
        System.out.println(present);
        if (present) {
            String s = optional.get();
            System.out.println(s);
        }
    }
}
